import * as echarts from "echarts/core"
import { BarChart, PieChart, EffectScatterChart, LinesChart } from "echarts/charts"
import {
  GridComponent,
  TooltipComponent,
  TitleComponent,
  LegendComponent,
  GeoComponent
} from "echarts/components"
import { CanvasRenderer } from "echarts/renderers"

const initBaseModules = () => {
  echarts.use([
    GridComponent,
    BarChart,
    PieChart,
    CanvasRenderer,
    TooltipComponent,
    TitleComponent,
    LegendComponent,
    GeoComponent,
    EffectScatterChart,
    LinesChart
  ])
}

export { initBaseModules, echarts }
